package com.mapper;

import com.pojo.ZhiShi_x;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface ZhiShiMapper_x {
    @Select("select * from zhishi_x")
    public List<ZhiShi_x> selectAll();
    @Select("select * from zhishi_x where del=1")
    public List<ZhiShi_x> select1();

    public List<ZhiShi_x> selectAll2(@Param("id") Integer id,@Param("title") String title,@Param("content") String content);
    @Insert("insert into zhishi_x (title,img,del,content) values (#{title},#{img},#{del},#{content})")
    Integer add(ZhiShi_x zhiShiX);
    @Update("update zhishi_x set title=#{title},img=#{img},del=#{del},content=#{content} where id=#{id}")
    Integer update(ZhiShi_x zhiShiX);
    @Delete("delete from zhishi_x where id=#{id}")
    Integer delete(Integer id);
}
